package com.itheima.map;

import java.util.Map;
import java.util.TreeMap;

/*
Map 的常用成员方法
 */
public class Demo02 {

    public static void main(String[] args) {
        Map<String,String> map = new TreeMap<>();
        map.put("马蓉","宋喆");
        map.put("都美竹","吴亦凡");
        map.put("小吉娜","吴亦凡");
        map.put("小璐","PGone");
        String result = map.remove("都美竹");
       /* System.out.println(map);

        System.out.println(result);
        System.out.println(map);
        System.out.println("清空 前:"+map.size());
        map.clear();
        System.out.println("清空 后:"+map.size());

        System.out.println(map);
        System.out.println(map.isEmpty());*/
        System.out.println(map.containsKey("马蓉"));
        System.out.println(map.containsKey("小璐"));

        System.out.println(map.containsValue("吴亦凡"));
        System.out.println(map.containsValue("PGone"));
    }
}
